package com.ruoyi.youtian.domain;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

import java.io.Serializable;
import java.util.List;
import java.util.stream.Collectors;

/**
 * 场景树结构实体类
 *
 * @author ruoyi
 */
@Data
public class TSceneCategoryTreeSelect implements Serializable
{
    private static final long serialVersionUID = 1L;

    /** 节点ID */
    private Long id;

    /** 节点名称 */
    private String label;

    private String title;

    private String level;

    private String labelType;

    /** 子节点 */
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<TSceneCategoryTreeSelect> children;

    /** 单位id **/
    private Long deptId;

    /** 单位名称 **/
    private String deptName;


    /** 二级单位ID **/
    private Integer ejdwId;

    /** 二级单位名称 **/
    private String ejdwName;

    /** 作业区ID **/
    private Integer zyqId;

    /** 作业区名称 **/
    private String zyqName;

    /**部门Id**/
    private Integer bmId;

    /** 部门名称 **/
    private String bmName;

    private Long dw_5_id;

    public TSceneCategoryTreeSelect()
    {

    }

    public TSceneCategoryTreeSelect(TSceneCategory scenceCategory)
    {
        this.id = scenceCategory.getSceneId();
        this.label = scenceCategory.getSceneName();
        this.title = scenceCategory.getSceneName();
        this.labelType = scenceCategory.getLabelType();
        this.dw_5_id = scenceCategory.getDw_5_id();
        this.children =  scenceCategory.getChildren().stream().map(TSceneCategoryTreeSelect::new).collect(Collectors.toList());
    }





}
